home *** CD-ROM | disk | FTP | other *** search
/ Libris Britannia 4 / science library(b).zip / science library(b) / DDJMAG / DDJ9310.ZIP / DFPP03.ZIP / CLOCK.CPP < prev    next >
C/C++ Source or Header  |  1993-08-11  |  429b  |  22 lines

  1. // ------- clock.cpp
  2.  
  3. #include "desktop.h"
  4. #include "applicat.h"
  5.  
  6. Clock::Clock()
  7. {
  8.     clocktimer.SetTimer(0);
  9. }
  10.  
  11. void Clock::DispatchEvent()
  12. {
  13.     if (clocktimer.TimedOut())    {
  14.         // -------- reset the timer
  15.         clocktimer.SetTimer(19);    // approx. 19 tics/second
  16.         // -------- post the clock event
  17.         if (desktop.ApplWnd() != 0)
  18.             desktop.ApplWnd()->ClockTick();
  19.     }
  20. }
  21.  
  22.